﻿@model Gueei.Gallery.Web.ViewModels.PagingViewModel
@using Gueei.Gallery.Web.Extensions

<script type="text/javascript">
	$(function () {
         $(".image-list").infinitescroll({
            navSelector: "div.pager",
            nextSelector: "div.pager a.next",
            itemSelector: ".image-list li",
            contentSelector: ".image-list",
            bufferPx: 500
        }, function (elems) {
            //$(".image-list li a").lightBox();
        }
        );
        //$(".image-list li a").lightBox();
    });
</script>
<div class="pager">
    <div class="totalItem">@Model.TotalItem, @Model.TotalPage</div>
    <ul>
        @if (Model.Page > 1)
        {
        <li><a class="prev" href="@Html.RenderPagerUrl(Model, Model.Page -1)">Prev</a></li>
        }
        @if (Model.MorePage)
        {
        <li><a href="@Html.RenderPagerUrl(Model, Model.Page + 1)" class="next">Next</a></li>
        }
    </ul>
</div>